﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace application.control
{
    public partial class permissionDblList : common.controls.doubleListBox
    {
        public permissionDblList()
        {
            InitializeComponent();
        }

        protected override int IndexOf(ListBox list, object itemObj)
        {
            common.myTypes.KeyValueExt item1 = (common.myTypes.KeyValueExt)itemObj;
            common.myTypes.KeyValueExt item2;
            for (int idx = 0; idx < list.Items.Count; idx++)
            {
                item2 = (common.myTypes.KeyValueExt)list.Items[idx];
                if (item1.Value == item2.Value) return idx;
            }
            return -1;
        }
    }
}
